﻿using Camc.Quality.QualityAnalysis.RFormBase;
using Camc.Quality.QualityAnalysis.RFormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.QualityAnalysis.RFormEntity
{
    public class R通用多媒体记录表 : RTableBase
    {
        public R通用多媒体记录表(int serialNum, int sort, Guid rWorkStepEntityId, Guid rProcessesEntityId, string fisrtDrawingNum,string recordRemark)
        {
            SerialNum = serialNum;
            Sort = sort;
            RWorkStepEntityId = rWorkStepEntityId;
            RProcessesEntityId = rProcessesEntityId;
            FisrtDrawingNum = fisrtDrawingNum;
            RecordRemark = recordRemark;
        }

        public override string FormName { get; protected set; } = "通用多媒体记录表";

        public override string FisrtDrawingNum_DisplayName { get; protected set; } = "项目";

        public RInspectionSignatureEntity SetInspectionSignature(RInspectionSignatureEntity entity, string firstOperator, DateTime? firstOperatorTime, string secondOperator, DateTime? secondOperatorTime)
        {
            entity.InspectionSignatureName = "二检";
            entity.SetFirstOperator(firstOperator, "记录人", firstOperatorTime, "记录人操作时间");
            entity.SetSecondOperator(secondOperator, "确认人", secondOperatorTime, "确认人操作时间");
            return entity;
        }
        /// <summary>
        /// 插入记录要求表
        /// </summary>
        public RRecordRequirementsEntity SetRecordRequirements(RRecordRequirementsEntity entity, string recordLocation, string recordRequire)
        {
            entity.SetRecordLocation(recordLocation, "部位");
            entity.SetRecordRequire(recordRequire, "拍照(摄像)");
            return entity;
        }
        /// <summary>
        /// 插入多媒体
        /// </summary>
        public RMultiMediaEntity SetMultiMedia(RMultiMediaEntity entity, string photoNo)
        {
            entity.SetMultiMedia(photoNo, "多媒体");
            return entity;
        }
        /// <summary>
        /// 插入实测结果表
        /// </summary>
        public RMeasuredResultEntity SetMeasuredResult(RMeasuredResultEntity entity, string confirmResult)
        {
            entity.SetConfirmResult(confirmResult, "确认结果");
            return entity;
        }
    }
}
